home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / vol15n11.zip / HKD.ZIP / HKDSRC.ZIP / HKDPDLG.CPP < prev    next >
C/C++ Source or Header  |  1996-03-24  |  2KB  |  67 lines

  1. // HKDPointDlg.cpp : implementation file
  2. //
  3. // HotKey Detective version 1.0
  4. // Copyright (c) 1996 Ziff-Davis Publishing
  5. // First published in PC Magazine June 11, 1996
  6. // Author: Gregory A. Wolking
  7.  
  8. #include "stdafx.h"
  9. #include "HKD.h"
  10. #include "HKDpDlg.h"
  11.  
  12. #ifdef _DEBUG
  13. #define new DEBUG_NEW
  14. #undef THIS_FILE
  15. static char THIS_FILE[] = __FILE__;
  16. #endif
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CHKDPointDlg dialog
  20.  
  21.  
  22. CHKDPointDlg::CHKDPointDlg(CWnd* pParent /*=NULL*/)
  23.     : CDialog(CHKDPointDlg::IDD, pParent)
  24. {
  25.     //{{AFX_DATA_INIT(CHKDPointDlg)
  26.     //}}AFX_DATA_INIT
  27. }
  28.  
  29.  
  30. void CHKDPointDlg::DoDataExchange(CDataExchange* pDX)
  31. {
  32.     CDialog::DoDataExchange(pDX);
  33.     //{{AFX_DATA_MAP(CHKDPointDlg)
  34.     DDX_Control(pDX, lstPoints, m_lstPoints);
  35.     //}}AFX_DATA_MAP
  36. }
  37.  
  38.  
  39. BEGIN_MESSAGE_MAP(CHKDPointDlg, CDialog)
  40.     //{{AFX_MSG_MAP(CHKDPointDlg)
  41.     ON_CBN_SELCHANGE(lstPoints, OnSelchangelstPoints)
  42.     //}}AFX_MSG_MAP
  43. END_MESSAGE_MAP()
  44.  
  45. // All code prior to this was generated by the App Wizard.
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CHKDPointDlg message handlers
  48.  
  49. BOOL CHKDPointDlg::OnInitDialog()
  50. {
  51.     CDialog::OnInitDialog();
  52.     // Set default selection.
  53.     m_PointSize = 10;
  54.     // Note: Combo box list entries are set at design time.
  55.     m_lstPoints.SetCurSel(1);
  56.     return TRUE;
  57. }
  58.  
  59. // Set m_PointSize based on which list item was selected.
  60. void CHKDPointDlg::OnSelchangelstPoints() 
  61. {
  62.     CString sel;
  63.  
  64.     m_lstPoints.GetLBText(m_lstPoints.GetCurSel(), sel);
  65.     sscanf(sel, "%u", &m_PointSize);
  66. }
  67.